package com.alon.spring01.proxy.jdk.service;

import com.alon.spring01.utils.ViolationCronUtils;

import java.text.ParsePosition;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @program: spring01
 * @description: 动态代理测试
 * @author: yulongguang
 * @create: 2019-08-19 16:54
 **/
public class MyDynamicTest {
    public static void main(String[] args) {
        String data="2019-08-20 16:10:00";
        SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
            ParsePosition pos = new ParsePosition(0);
            Date strtodate = formatter.parse(data, pos);

        String cron = ViolationCronUtils.getCron(strtodate);
        System.out.println(cron);

    }
}
